* Set up directory structure and
*   run all programs for basic summary tables/figures and relative demand estimation

set more off
clear all

******************************************************************************************************
* Setting directories
******************************************************************************************************

global root "D:\users\llochner\Dropbox\JOINT PROJECTS\JPE_Child_Devp_2020\FINAL_Replication_CLMP_JPE"  // Must set root directory!

******************************************************************************************************

global data       "$root\data\data_derived"

global do_files   "$root\code\estimation\basics_rel_demand"
global temp       "$root\code\estimation\basics_rel_demand\temp_data"
global log_files  "$root\code\estimation\basics_rel_demand\logs"

global tables     "$root\output\tables"
global graph      "$root\output\figures"

******************************************************************************************************
* Run do files
******************************************************************************************************

do "$do_files/1_fixed_effect_fin.do"  				//runs FE estimation using the panel of mothers and fathers
do "$do_files/2_create_child_data_fin.do" 			// merges child panel with external datasets and FE
do "$do_files/3_data_cleaning_child_panel_fin.do" 	// data cleaning, variable creation
do "$do_files/4_summary_fin.do" 					//summarizes inputs
do "$do_files/5_demand_estimation_fin.do" 			//runs demand estimation 
